﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleCompiler
{
    public class StatementDeclareVariable : Statement
    {
        public StatementDeclareVariable(string name, TypeNotNoneName typeNotNoneName)
        {
            this.name = name;
            this.typeNotNoneName = typeNotNoneName;
        }
        string name;
        TypeNotNoneName typeNotNoneName;
        public override Variable Execute(RuntimeVariableScope scope)
        {
            scope.InitVariable(name, typeNotNoneName);
            return Variable.None;
        }
    }
}
